<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'Login\LoginController@Login');      //  登录页面


Route::get('/index', 'Home\IndexController@index');      // 后台首页
Route::post('/dologin', 'Login\LoginController@doLogin');      //  登录
Route::get('/validateCode', 'ValidateCode\ValidateCodeController@doimg');                    // 图片验证码

Route::group(['middleware' => ['Login']], function () {
    Route::get('/home', 'Home\IndexController@home');      // 后台首页

    Route::get('/logout', 'Login\LoginController@Logout');      //  退出登录
    /*****************用户管理****************/
    Route::get('/account', 'Account\IndexController@index');      //  账户列表页面
    Route::get('/getMemberList', 'Account\IndexController@getAccountList');      //  账户列表
    Route::post('/addMember', 'Account\IndexController@addAccount');      // 添加账户
    Route::post('/forbiddenMem', 'Account\IndexController@forbiddenMem');      //  冻结账户
    Route::post('/thawMember', 'Account\IndexController@thawMember');           //解冻账户
    Route::get('/getAdminOrder', 'Account\IndexController@getAdminOrder');      // 流水号
    Route::post('/accRecharge','Account\IndexController@accRecharge');          //给用户充值



    /*******用户详情******/
    Route::get('/acc_detail','Account\AccountDetailController@accDetail');      //用户详情页面
    Route::post('/getAccDetail','Account\AccountDetailController@getAccountDetail');        //获取用户详情
    Route::post('/resetAccPassword','Account\AccountDetailController@resetPassword');        //重置会员密码


    Route::post('/getUserSetMealTimeList','Account\AccountDetailController@getUserSetMealTimeList');        //获取用户时长套餐列表
    Route::post('/getUserSetMealNumList','Account\AccountDetailController@getUserSetMealNumList');        //获取用户包量套餐列表
    Route::post('/renewSetMeal','Account\AccountDetailController@renewSetMeal');        //续费包量套餐列表
    Route::post('/updateSetMeal','Account\AccountDetailController@updateSetMeal');      //套餐修改
    Route::post('/addPackage','Account\AccountDetailController@addSetMeal');          //给用户充值

    Route::post('/getUserWalletList','Account\AccountDetailController@getUserWalletList');        //获取用户钱包流水

    /*******订单*******/

    Route::get('/getProOrderList','Order\ProductOrderController@getProOrderList');        //用户时长套餐列表
    Route::get('/getReOrderList','Order\RechargeOrderController@getReOrderList');        //用户时长套餐列表


    /******导出功能*****/
    Route::get('/downloadMemeberData','Account\IndexController@downloadMemeberData');     //导出用户列表
    Route::get('/downProOrderList','Order\ProductOrderController@downloadProOrderList');        //导出用户时长套餐列表
    Route::get('/downReOrderList','Order\RechargeOrderController@downloadReOrderList');        //导出用户时长套餐列表





    /*****************订单管理********************************/

    Route::get('productOrder','Order\ProductOrderController@index');                   //套餐订单页面
    Route::get('getProOrderList','Order\ProductOrderController@getProOrderList');           //套餐订单列表
    Route::get('rechargeOrder','Order\RechargeOrderController@index');           //充值订单页面
    Route::get('getRechargeOrderList','Order\RechargeOrderController@getReOrderList');           //充值订单列表














    /***********************套餐管理***********************************/
    Route::get('/product', 'Product\IndexController@index');      //  index
    Route::get('/productList', 'Product\IndexController@productList');      //  index
    Route::get('/getProductList', 'Product\IndexController@getProductList');      //  产品列表
    Route::post('/addProductTimeType', 'Product\IndexController@addProductTimeType');      //  添加产品时间类型
    Route::post('/addProductType', 'Product\IndexController@addProductType');      //  添加产品类型
    Route::post('/addProduct', 'Product\IndexController@addProduct');      //  添加产品类型
    Route::post('/deleteProduct', 'Product\IndexController@delProduct');      //  添加产品类型
    Route::post('/updateProduct', 'Product\IndexController@updateProduct');      //  改变产品信息

    /***********************充值产品管理***********************************/

    Route::get('/recharge', 'Product\RechargeController@index');      //  index
    Route::get('/getRechargeList', 'Product\RechargeController@getRechargeList');      //  产品列表
    Route::post('/addRecharge', 'Product\RechargeController@addRecharge');      //  添加产品时间类型
    Route::post('/updateRecharge', 'Product\RechargeController@updateRecharge');      //  添加产品类型
    Route::post('/deleteRecharge', 'Product\RechargeController@delRecharge');      //  删除充值套餐

    /***********************客服管理***********************************/
    Route::get('/serviceLog', 'Custom\CustomServiceController@index');      //  客服日志页面

    Route::get('/getServiceLogList', 'Custom\CustomServiceController@index');      //  客服业务日志

    /***********************demo路由***********************************/
    Route::get('/demo', 'Demo\IndexController@demo');      //  Demo测试-账户列表页面
    Route::get('/getAccountList', 'Demo\IndexController@getAccountList');      //  Demo测试-账户列表
    Route::post('/addAccount', 'Demo\IndexController@addAccount');      //  Demo测试-添加账户
    Route::post('/deleteAccount', 'Demo\IndexController@delAccount');      //  Demo测试-添加账户
    Route::post('/updateAccount', 'Demo\IndexController@updateAccount');      //  Demo测试-添加账户

    /***********************调取统计***********************************/
    Route::get('/apiCount', 'Demo\CountController@index');      //  调取统计页面
    Route::get('/getApiCountList', 'Demo\CountController@getApiCountList');      //  Demo测试-api调取列表


    /***********************管理员***********************************/
    Route::get('/admin', 'Admin\IndexController@index');      //  index
    Route::get('/getAdminList', 'Admin\IndexController@getAdminList');      //  管理员列表
    Route::post('/addAdmin', 'Admin\IndexController@addAdmin');      //  Demo测试-添加账户
    Route::post('/deleteAdmin', 'Admin\IndexController@deleteAdmin');      //  Demo测试-添加账户
    Route::post('/updateAdmin', 'Admin\IndexController@updateAccount');      //  Demo测试-添加账户

    /**********************账号设置******************************/

    Route::get('/mysetting', 'Setting\SettingController@index');      //  账号设置页面
    Route::get('/resettingPassword', 'Setting\SettingController@resettingPassword');      //  账号设置

});
